package com.nuaa.domain;

import java.io.Serializable;

import javax.persistence.Embeddable;

@Embeddable
public class JointKey implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 8013477470732089349L;
	private int id;
	private String business_type;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getBusiness_type() {
		return business_type;
	}
	public void setBusiness_type(String business_type) {
		this.business_type = business_type;
	}
	
	
    @Override  
    public boolean equals(Object o) {  
        if(o instanceof JointKey){  
        	JointKey key = (JointKey)o ;  
            if(this.id == key.getId() && this.business_type.equals(key.getBusiness_type())){  
                return true ;  
            }  
        }  
        return false ;  
    }  
      
    @Override  
    public int hashCode() {  
        return this.business_type.hashCode();  
    }
}
